import { createWebHashHistory, createRouter } from 'vue-router'

import login from '../views/login/index.vue'
import layout from "../layout/index.vue"

const routes = [
    { path: '/login', name: "登陆", component: login },
    {
        path: '/',icon:'HelpFilled', name: "首页", component: layout, children: [
            { path: '/',icon:'HelpFilled' ,name: '工作台', component: () => import('../views/home/index.vue') },
        ]
    }, {
        path: '/system', icon:'HelpFilled', name: "系统设置", component: layout, children: [
            { path: 'users',icon:'UserFilled', name: "用户管理", component: () => import('../views/system/user/index.vue') },
            { path: 'role',icon:'Tools', name: "角色管理", component: () => import('../views/system/role/index.vue') },
        ]
    }
]


const router = createRouter({
    history: createWebHashHistory(),
    routes,
})

export default router